<template>
	<view class="xbd-error-page">
		<button type="default" class="btn" @click="reload">重新加载</button>
	</view>
</template>

<script>
	export default {
		name: 'XbdErrorPage',
		methods: {
			reload() {
				const page = getCurrentPages();
				uni.redirectTo({
					url: page[page.length - 1].$page.fullPath
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.xbd-error-page {
		position: fixed;
		top: 0;
		bottom: 0;
		right: 0;
		left: 0;
		
		background-color: #DDDDDD;
		.btn {
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
			width: 400rpx;
			height: 36px;
			
			font-size: 28rpx;
			
			color: #FFFFFF;
			background-color: $uni-color-primary;
		}
	}
</style>
